﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EnvDTE;

namespace BaseAddIn.Analysis
{
    public abstract class Base : IDisposable
    {
        #region Campos

        private List<Rules.ProblemAddIn> _listaProblemas;

        #endregion

        #region Propriedades

        public List<Rules.ProblemAddIn> ListaProblemas
        {
            get { return _listaProblemas; }
            set { _listaProblemas = value; }
        }

        #endregion

        #region Construtor

        public Base()
        {
            _listaProblemas = new List<BaseAddIn.Rules.ProblemAddIn>();
        }

        #endregion

        #region Public Abstract Methods

        public abstract void Analise(Project projetoAnalisar);

        #endregion

        #region Public Virtual Methods

        public virtual void Dispose()
        {
            if (_listaProblemas != null)
                _listaProblemas.Clear();

            _listaProblemas = null;
        }

        #endregion

        #region Public Methods

        public void PreparaAnalise()
        {
            if (_listaProblemas != null)
                _listaProblemas.Clear();
        }

        #endregion
    }
}
